package com.atguigu4.search_sort.exer2;

/**
 * @author NoobMaster69  * @date 2024/5/27 0027 星期一 15:58
 */
public class ArrayExer {
    public static void main(String[] args) {
        int[] arr1 = new int[]{34,54,3,2,65,7,34,5,76,34,67};

        int find = 5;
        int i;
        for (i = 0; i < arr1.length; i++) {
            if(find == arr1[i]){
                System.out.println("找到了" + find + "位置是:" + i );
                break;
            }
        }

        if(i == arr1.length){
            System.out.println("没捞着");
        }

    }
}
